class_name EalgeStateMachine
extends GameplayStateMachine

@onready var eagle: Eagle = $"../"


func _on_setup() -> void:
	var idle_transition = ConditionStateTransition.new("IdleState", func(): return not eagle.state_checker.is_player_detected, func(): pass)
	add_transition("GhostState", idle_transition)

	var attack_transition = ConditionStateTransition.new("AttackState", func(): return eagle.state_checker.is_player_detected, func(): pass)
	add_transition("GhostState", attack_transition)
	add_transition("IdleState", attack_transition)


func _ready() -> void:
	on_setup()


func _process(delta: float) -> void:
	on_update(delta)
